<template>
  <!--监控预览执行计划页面-->
  <el-dialog  :visible.sync="open" width="600px" :close-on-click-modal="false" append-to-body>
        <el-table :data="result"  border
                  style="width: 100%">>
          <el-table-column
            prop="type"
            label="类型"
            width="150">
          </el-table-column>
          <el-table-column
            prop="key"
            label="Key"
            width="100">
          </el-table-column>
          <el-table-column
            prop="ifCheck"
            label="是否检查"
            width="150">
            <template slot-scope="scope">
              <span>{{scope.row.ifCheck === true ?'是':'否' }}</span>
            </template>

          </el-table-column>
          <el-table-column
            prop="result"
            label="结果"
            width="150">
          </el-table-column>
        </el-table>
  </el-dialog>

</template>
<script>
import api from '@/api/monitor/monitor'
// import {parseTime} from '@/utils'

// const now = parseTime(new Date(new Date().getTime()), '{y}-{m}-{d}')
export default {
  data() {
    return {
      open: false,
      // 弹出层标题
      title: "",
      result:
        [
          {
            "type": "ALL",
            "key": "province",
            "ifCheck": false,
            "result": null
          },
          {
            "type": "INCLUDE_SET",
            "key": "dt",
            "ifCheck": true,
            "result": [
              "2020-06-14"
            ]
          }
        ]
    };
  },
  mounted() {
    this.init()
  } ,
  methods: {
    init() {
        this.open = true;
        this.title = "预览执行计划";
        // this.$nextTick(() => {
        //   api.allRulesByTableName().then(response => {
        //     this.result = response.data;
        //     this.open = true;
        //   });
        // });
      },
    handleSizeChange(val) {
      this.pageSize = val
      this.handList(this.optionCode)
    },
    handleCurrentChange(val) {
      this.pageNo = val
      this.handList(this.optionCode)
    }
    }
}
</script>



